﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IWMAG.Scripting.Types {
    public class PrimitiveType : CodeType {
        public enum Primitive {
            Void, Int, Real, Bool, String,
            Auto
        }

        public Primitive Type;

        public PrimitiveType(Primitive t) {
            Type = t;
        }

        public override string ToString() {
            return Type.ToString().ToLower();
        }

        public override int GetHashCode() {
            return Type.GetHashCode();
        }

        public override bool Equals(object obj) {
            if (!(obj is PrimitiveType)) {
                return false;
            }

            return (obj as PrimitiveType).Type == Type;
        }
    }
}
